load("@npm//@bazel/typescript:index.bzl", "ts_library")

package(default_visibility = ["//:__subpackages__"])

ts_library(
    name = "hybrid",
    srcs = [
        "decrypt.ts",
        "decrypt_wrapper.ts",
        "ecies_aead_hkdf_for_decrypting.ts",
        "ecies_aead_hkdf_for_encrypting.ts",
        "ecies_aead_hkdf_private_key_manager.ts",
        "ecies_aead_hkdf_public_key_manager.ts",
        "ecies_aead_hkdf_util.ts",
        "ecies_aead_hkdf_validators.ts",
        "ecies_with_aes_ctr_hmac.ts",
        "ecies_with_aes_gcm.ts",
        "encrypt.ts",
        "encrypt_wrapper.ts",
        "hybrid_config.ts",
        "hybrid_decrypt_wrapper.ts",
        "hybrid_encrypt_wrapper.ts",
        "hybrid_key_templates.ts",
        "index.ts",
        "registry_ecies_aead_hkdf_dem_helper.ts",
    ],
    module_name = "tink-crypto/hybrid",
    deps = [
        "//aead",
        "//exception",
        "//hybrid/internal",
        "//internal",
        "//internal:proto",
        "//subtle",
    ],
)

ts_library(
    name = "hybrid_tests",
    testonly = True,
    srcs = [
        "ecies_aead_hkdf_private_key_manager_test.ts",
        "ecies_aead_hkdf_public_key_manager_test.ts",
        "ecies_aead_hkdf_util_test.ts",
        "ecies_aead_hkdf_validators_test.ts",
        "hybrid_config_test.ts",
        "hybrid_decrypt_wrapper_test.ts",
        "hybrid_encrypt_wrapper_test.ts",
        "hybrid_key_templates_test.ts",
        "registry_ecies_aead_hkdf_dem_helper_test.ts",
    ],
    deps = [
        ":hybrid",
        "//aead",
        "//exception",
        "//hybrid/internal",
        "//internal",
        "//internal:proto",
        "//subtle",
        "//testing/internal",
        "@npm//@types/jasmine",
    ],
)
